package com.itheima;

public class Cat {

    String color = new String();
    String breed = new String();
    String eat = new String();
    String catchHouse = new String();

    public void set() {
        color = null;
        breed = null;
        eat = null;
        catchHouse = null;
    }

    public void set(String col, String bre, String act, int option) {
        color = col;
        breed = bre;
        if (option == 1) {
            eat = act;
        } else if (option == 2) {
            catchHouse = act;
        } else {
            System.out.println("猫咪无此功能");
            return;
        }
    }

    public void get(int option) {
        if (option == 1) {
            System.out.println(color + breed + "正在" + eat);
        } else if (option == 2) {
            System.out.println(color + breed + "正在" + catchHouse);
        } else {
            System.out.println("功能选项错误");
            return;
        }
    }


}
